package com.orangeumbrella;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.RelativeLayout;

import com.easylib.base.BaseActivity;
import com.orangeumbrella.entity.DayLineBean;
import com.orangeumbrella.entity.EmergencyContactBean;
import com.orangeumbrella.entity.TitleBean;
import com.orangeumbrella.entity.WorkDayBean;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;

public class UserInfoActivity extends BaseActivity {

    @Bind(R.id.recycler)
    RecyclerView recycler;
    @Bind(R.id.activity_user_info)
    RelativeLayout activityUserInfo;

    LinearLayoutManager llm;
    MultiListAdapter adapter;
    private List<Object> datas;


    @Override
    public int getContentViewId() {
        return R.layout.activity_user_info;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
    }

    @Override
    protected void initVariable() {
        datas = new ArrayList<>();
        datas.add(new TitleBean("个人信息"));
        datas.add(new TitleBean("姓名："));
        datas.add(new TitleBean("籍贯："));
        datas.add(new TitleBean("现居住地："));
        datas.add(new TitleBean("身份证号："));
        datas.add(new TitleBean("联系方式："));
        datas.add(new TitleBean("紧急联系人："));
        datas.add(new EmergencyContactBean("姓名：", "：", "联系方式："));
        datas.add(new EmergencyContactBean("姓名：", "关系：", "联系方式："));
        datas.add(new TitleBean("日常轨迹"));
        datas.add(new DayLineBean(""));
        datas.add(new DayLineBean(""));
        datas.add(new DayLineBean(""));
        datas.add(new TitleBean("日常时间"));
        datas.add(new WorkDayBean("周一"));
        datas.add(new WorkDayBean("周二"));
        datas.add(new WorkDayBean("周三"));
        datas.add(new WorkDayBean("周四"));
        datas.add(new WorkDayBean("周五"));
        datas.add(new WorkDayBean("周六"));
        datas.add(new WorkDayBean("周日"));
        datas.add(new TitleBean("误操取消"));
        llm = new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false);
        adapter = new MultiListAdapter(mContext, datas);
    }

    @Override
    protected void processLogic(Bundle savedInstanceState) {
        recycler.setLayoutManager(llm);
        recycler.setAdapter(adapter);
    }
}
